﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Editer.aspx.cs" Inherits="CPEBookWeb.Editer" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">

    <title>CPEBook - Modifier votre profil</title>

    <% Response.WriteFile("templates/head.tpl"); %>

</head>
<body>


<asp:ObjectDataSource ID="DataSourceListeSexes" runat="server" SelectMethod="getSexesDescriptions" TypeName="Entity.Sexe"></asp:ObjectDataSource>
<asp:ObjectDataSource ID="DataSourceListeFillieres" runat="server" SelectMethod="getFillieresDescriptions" TypeName="Entity.Filliere"></asp:ObjectDataSource>


<form id="form" runat="server">

    <asp:ScriptManager ID="ScriptManager" runat="server"></asp:ScriptManager>

    <asp:UpdateProgress ID="UpdateProgressActualites" runat="server">
        <ProgressTemplate>
            <% Response.WriteFile("templates/progress.tpl"); %>
        </ProgressTemplate>
    </asp:UpdateProgress>

    <% Response.WriteFile("templates/header.tpl"); %>

    <div id="recherche">
	    <div id="rechercheinput">
            <asp:TextBox ID="rechercheInput" runat="server" CssClass="input"></asp:TextBox>
	    </div>
		<div id="recherchebouton">
            <asp:Button ID="rechercheBouton" runat="server" CssClass="bouton" 
                Text="Rechercher" onclick="rechercheBouton_Click" 
                ValidationGroup="rechercheValGroupe" />
        </div>
        <div id="recherchevalidator">
		    <asp:RegularExpressionValidator ID="rechercheValidator" runat="server" 
                ControlToValidate="rechercheInput" CssClass="validateur" 
                ErrorMessage="" ValidationExpression="[ ]*[\wàâéèêëiîïoôö]+[\wàâéèêëiîïoôö ]*" 
                ValidationGroup="rechercheValGroupe"></asp:RegularExpressionValidator>
		</div>
	</div>

    <div class="menu"> 
	    <a href="Logout.aspx" class="lien">Déconnexion</a> 
	</div>
    <div class="menu"> 
	    <asp:HyperLink ID="lienBarreProfil" runat="server" CssClass="lien">Profil</asp:HyperLink>
	</div>
    <div class="menu"> 
	    <a href="Mur.aspx" class="lien">Accueil</a> 
	</div>

    <% Response.WriteFile("templates/menu.tpl"); %>

    <div id="cartevisite">

	    <asp:HyperLink ID="lienConsulterProfil" runat="server" CssClass="identite">[Prénom Nom]</asp:HyperLink>

	</div>

    <asp:UpdatePanel ID="UpdatePanelDemandes" runat="server">
        <ContentTemplate>
            <asp:Panel ID="panelDemandes" runat="server" CssClass="demandes"></asp:Panel>
        </ContentTemplate>
    </asp:UpdatePanel>

    <% Response.WriteFile("templates/middle.tpl"); %>

    <h1>Modifier votre profil</h1>

				<div id="inscriptiontable">
				
					<table border="0" cellspacing="4" cellpadding="0" align="right">
                    <tr>
                        <td colspan="3" class="insctderror"><asp:Label ID="labErreurInscription" runat="server" Text=""></asp:Label></td>
                    </tr>
					<tr>
						<td class="inscth">Prénom :</td>
						<td class="insctd"><asp:TextBox ID="tbPrenom" runat="server" CssClass="inscinput"></asp:TextBox></td>
						<td class="inscerror"><asp:RequiredFieldValidator ID="valPrenom" runat="server" 
            ControlToValidate="tbPrenom" ErrorMessage="Vous devez saisir un prénom" 
            ValidationGroup="valGroupeInscription"></asp:RequiredFieldValidator></td>
					</tr>
					<tr>
						<td class="inscth">Nom :</td>
						<td class="insctd"><asp:TextBox ID="tbNom" runat="server" CssClass="inscinput"></asp:TextBox></td>
						<td class="inscerror"><asp:RequiredFieldValidator ID="valNom" runat="server" 
            ControlToValidate="tbNom" ErrorMessage="Vous devez entrer un nom" 
            ValidationGroup="valGroupeInscription"></asp:RequiredFieldValidator></td>
					</tr>
					<tr>
						<td class="inscth">Adresse e-mail :</td>
						<td class="insctd"><asp:Label ID="infoemail" runat="server" Text="[E-mail]"></asp:Label></td>
					</tr>
					<tr>
						<td class="inscth">Mot de passe :<br /><span class="inscexemple">Vide pour conserver</span></td>
						<td class="insctd"><asp:TextBox ID="tbMotDePasse" runat="server" TextMode="Password" CssClass="inscinput"></asp:TextBox></td>
						<td class="inscerror"><asp:CompareValidator ID="valMotDePasse" runat="server" 
            ControlToCompare="tbMotDePasse" ControlToValidate="tbMotDePasseRepeter" 
            ErrorMessage="Les mots de passe ne sont pas identique" 
            ValidationGroup="valGroupeInscription"></asp:CompareValidator></td>
					</tr>
					<tr>
						<td class="inscth">Confirmer :<br /><span class="inscexemple">Vide pour conserver</span></td>
						<td class="insctd"><asp:TextBox ID="tbMotDePasseRepeter" runat="server" TextMode="Password" CssClass="inscinput"></asp:TextBox></td>
						<td class="inscerror"><asp:CompareValidator ID="valMotDePasseRepeter" runat="server" 
            ControlToCompare="tbMotDePasseRepeter" ControlToValidate="tbMotDePasse" 
            ErrorMessage="Les mots de passe ne sont pas identique" 
            ValidationGroup="valGroupeInscription"></asp:CompareValidator></td>
					</tr>
					<tr>
						<td class="inscth">Sexe :</td>
						<td class="insctd">
							<asp:ListBox ID="lbSexe" runat="server" DataSourceID="DataSourceListeSexes" 
        DataTextField="Libelle" DataValueField="Valeur" Rows="1" CssClass="inscselect"></asp:ListBox>
						</td>
						<td class="inscerror"></td>
					</tr>
					<tr>
						<td class="inscth">Fillière :</td>
						<td class="insctd">
							<asp:ListBox ID="lbFilliere" runat="server" 
        DataSourceID="DataSourceListeFillieres" DataTextField="Libelle" 
        DataValueField="Valeur" Rows="1" CssClass="inscselect"></asp:ListBox>
						</td>
						<td class="inscerror"></td>
					</tr>
					<tr>
						<td class="inscth">Promotion :<br /><span class="inscexemple">ex: 2011</span></td>
						<td class="insctd"><asp:TextBox ID="tbPromotion" runat="server" ValidationGroup="valGroupeInscription" CssClass="inscinput"></asp:TextBox></td>
						<td class="inscerror"><asp:RequiredFieldValidator ID="valPromotionPresente" runat="server" 
            ControlToValidate="tbPromotion" ErrorMessage="Entrez votre promotion" 
            ValidationGroup="valGroupeInscription"></asp:RequiredFieldValidator>
        <asp:RegularExpressionValidator ID="valPromotionValide" runat="server" 
            ControlToValidate="tbPromotion" ErrorMessage="Promotion invalide" 
            ValidationExpression="(19|20)\d{2}" ValidationGroup="valGroupeInscription"></asp:RegularExpressionValidator></td>
					</tr>
					<tr>
						<td class="inscth">Date de naissance :<br /><span class="inscexemple">ex: 31/05/1987</span></td>
						<td class="insctd"><asp:TextBox ID="tbDateNaissance" runat="server" ValidationGroup="valGroupeInscription" CssClass="inscinput"></asp:TextBox></td>
						<td class="inscerror"><asp:RequiredFieldValidator ID="valDateNaissancePresente" runat="server" 
            ControlToValidate="tbDateNaissance" ErrorMessage="Entrez une date de naissance" 
            ValidationGroup="valGroupeInscription"></asp:RequiredFieldValidator>
        <asp:RegularExpressionValidator ID="valDateNaissanceValide" runat="server" 
            ControlToValidate="tbDateNaissance" ErrorMessage="Date de naissance invalide" 
            ValidationExpression="\d{1,2}/\d{1,2}/\d{4}" 
            ValidationGroup="valGroupeInscription"></asp:RegularExpressionValidator></td>
					</tr>
					<tr>
                        <td></td>
						<td class="inscthsubmit">
							<asp:Button ID="btnEnregistrer" runat="server" Text="Enregistrer mon profil" onclick="btnEnregistrer_Click" ValidationGroup="valGroupeInscription" CssClass="inscsubmit" />
						</td>
						<td></td>
					</tr>
					</table>
				
				</div>

<% Response.WriteFile("templates/footer.tpl"); %>

</form>

</body>
</html>